# -*- coding: utf-8 -*-
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.conf import settings
import os
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'Comment.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^$', 'talk.views.index', name='home'),
    url(r'^admin/', include(admin.site.urls)),

    url(r'^add/$','talk.views.add',name='add'),
    url(r'^add/(\d+)/(\d+)/$','talk.views.add2',name='add2'),
)

if settings.DEBUG:
    media_root = os.path.join(settings.BASE_DIR,'media')
    urlpatterns += static('/media/',document_root = media_root)